{deps, [
    {erlport, {git, "https://gitee.com/fastdgiot/erlport", {tag, "v1.2.2"}}},
    {erlydtl, {git, "https://gitee.com/fastdgiot/erlydtl.git", {tag, "0.12.1"}}},
    {poolboy, {git, "https://gitee.com/fastdgiot/poolboy.git", {tag, "1.5.3"}}}
]}.

{port_specs, [
    {"priv/iconv.so", [
        "c_src/*.c",
        "c_src/*.cc"
    ]}
]}.

{port_env, [
    {".*", "FLTO_FLAG", "-flto"},

    {"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
        "CFLAGS", "$CFLAGS -Ic_src/ -g -Wall $FLTO_FLAG -Werror -O3"},
    {"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
        "CXXFLAGS", "$CXXFLAGS -Ic_src/ -g -Wall $FLTO_FLAG -Werror -O3"},

    {"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
        "LDFLAGS", "$LDFLAGS $FLTO_FLAG -lstdc++"},

    %% OS X Leopard flags for 64-bit
    {"darwin9.*-64$", "CXXFLAGS", "-m64"},
    {"darwin9.*-64$", "LDFLAGS", "-arch x86_64"},

    %% OS X Snow Leopard flags for 32-bit
    {"darwin10.*-32$", "CXXFLAGS", "-m32"},
    {"darwin10.*-32$", "LDFLAGS", "-arch i386"},

    {"win32", "CXXFLAGS", "$CXXFLAGS /O2 /DNDEBUG"}
]}.

{erl_opts, [
    {platform_define, "R1(1|2|3|4|5|6)", 'JIFFY_NO_MAPS'}
]}.

{eunit_opts, [
    verbose
]}.

{provider_hooks, [
    {pre, [
        {compile, {pc, compile}},
        {clean, {pc, clean}}
    ]}
]}.
